home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programmer's Power Pack
/
Delphi Volume 1.iso
/
s_to_z
/
wmapdemo
/
data.z
/
SETBMP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-03-09
|
1KB
|
63 lines
unit Setbmp;
interface
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
StdCtrls, ExtCtrls, Sysutils;
type
TSetBMPDlg = class(TForm)
OKBtn: TBitBtn;
CancelBtn: TBitBtn;
HelpBtn: TBitBtn;
Bevel1: TBevel;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
Preview: TCheckBox;
Label3: TLabel;
Label4: TLabel;
procedure OKBtnClick(Sender: TObject);
private
{ Private declarations }
phgap : ^integer;
pvgap : ^integer;
pbPreview : ^boolean;
public
{ Public declarations }
constructor Create(AOwner:TComponent; var iwidth,iheight : integer; var bPrev:boolean);
end;
var
SetBMPDlg: TSetBMPDlg;
implementation
{$R *.DFM}
constructor TSetBMPDlg.Create(AOwner:TComponent; var iwidth,iheight : integer; var bPrev:boolean);
begin
inherited Create(AOwner);
phgap := Addr(iwidth);
pvgap := Addr(iheight);
pbPreview := Addr(bPrev);
Edit1.text := inttostr(iwidth);
Edit2.text := inttostr(iheight);
end;
procedure TSetBMPDlg.OKBtnClick(Sender: TObject);
begin
try
phgap^ := strtoint(Edit1.text);
pvgap^ := strtoint(Edit2.text);
if preview.checked then pbPreview^ := true else pbPreview^ := false;
except
On EConvertError do begin
ActiveControl := edit1;
modalresult := mrNone;
end;
end;
end;
end.